

sampler SceneSampler : register(s0);
sampler TransitionSampler : register(s1);

float TransitionPosition = 0.0;

float4 main(float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
	float4 scene = tex2D(SceneSampler, texCoord);
    float transitionMask = tex2D(TransitionSampler, texCoord).r;

    scene.a = (TransitionPosition > transitionMask) ? 1 : 0;

    return scene;
}

technique T
{
	pass P
    {
       PixelShader = compile ps_2_0 main();
    }
}